<%@ Control Language="C#" %>
<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="Syrinx.Gui.AspNet.NitobiCtls" Namespace="Syrinx.Gui.AspNet.NitobiCtls" TagPrefix="nit" %>

<table width="100%">
    <%HtmlBlock method="processList"; %>
    <tr>
    <%HtmlBlock method="processInnerList"; %>
<%Conditional on = "CurrentBizObj.product.metaType==-Department"; %>
</tr><tr><td colspan="<%=ColumnElements %>">
<div class="departmentlistbox">
	<div class="title"><asp:HyperLink ID="product_title" runat="server" NavigateUrl="$navLink$" /></div>
	<div class="summary"><swf:ReadOnlyText ID="product_summary" runat="server" /></div>
</div>
</td></tr><tr>
<%=ResetColCount %>
<%EndConditional; %>

<%Conditional on = "CurrentBizObj.product.metaType!=-Department"; %>
    <td valign="top">
    <div class="productbox">
		<h6><asp:HyperLink ID="product_title" runat="server" NavigateUrl="$navLink$" /></h6>	
		<div class="priceArea"><asp:Label id="_priceLbl" runat="server">Price:</asp:Label> <swf:ReadOnlyText id="product_sellPriceFormated" runat="server" /></div>
		<%Conditional on = "CurrentBizObj.product.quantityAvailable!=0"; %>
			<%Conditional on = "CurrentBizObj.product.quantityAvailable!=-2"; %>
				<%Conditional on = "CurrentBizObj.quantity!=0"; %>
				<div class="quantityArea"><asp:Label ID="_quantityLbl" runat="server">Quantity:</asp:Label><asp:TextBox runat="server" ID="quantity" Width="2em" /></div>
				<div class="cart"><nit:ActionButton runat="server" ID="add2CartBtn" Actions="$Parent$.UpdateBizObj" Text=""/></div>
				<%EndConditional; %>
				<%Conditional on = "CurrentBizObj.quantity==0"; %>
				<div class="cart"><nit:ActionButton runat="server" ID="addOneToCartBtn" Actions="$Parent$.AddOne" Text="Add To Cart" TriggerParam="$id$" /></div>
				<%EndConditional; %>
			<%EndConditional; %>
			<%Conditional on = "CurrentBizObj.product.quantityAvailable==-2"; %>
				<div class="quantityArea" style="font-size:smaller">
				<asp:Label runat="server" ID="_needStart" Text="Make reservation to see availability." /></div>			
			<%EndConditional; %>
		<%EndConditional; %>
		<%Conditional on = "CurrentBizObj.product.quantityAvailable==0"; %>
			<div class="quantityArea"><asp:Label runat="server" ID="_unavail" Text="Unavailable" /></div>
		<%EndConditional; %>
		<div class="body"><swf:ReadOnlyText ID="product_body" runat="server" /></div>
    </div>
    </td>
<%EndConditional; %>
    <%EndHtmlBlock; %>
    </tr>
    <%EndHtmlBlock; %>
</table>
